﻿
/*----------------------------------------------------------------//
// 文件名：MoAssDgScore.cs
// 文件功能描述：实体 MoAssDgScore.
// 
// 创建标识：Template  ver 5.0.20090429 2009-07-10
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoAssDgScore
using System;
using System.Data;
namespace Las.Model
{
	/// <summary>
	/// 业务实体MoAssDgScore
	/// </summary>
	public partial class MoAssDgScore:ICloneable
	{
		#region 表AssDgScore的字段
		private string aksId;
		private string asisId;
		private string assDgId;
		private string dgName;
		private string dgType;
		private int adiAttr;
		private string adsItemId;
		private string adsItemName;
		private int cj;
		private int cjStyle;
		private int mcj;
		private int cjStatus;
		private DateTime crTime;
		private string crUid;
		private string luUid;
		private DateTime luTime;
		private string rem;
		#endregion
		
		#region 构造函数
		public MoAssDgScore()
		{
			            crTime=new DateTime(1900,1,1);   luTime=new DateTime(1900,1,1);   	    
		   
		}
		#endregion
		
		#region 拷贝构造函数

		public MoAssDgScore(MoAssDgScore item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoAssDgScore(string aksId,string asisId,string assDgId,string dgName,string dgType,int adiAttr,string adsItemId,string adsItemName,int cj,int cjStyle,int mcj,int cjStatus,DateTime crTime,string crUid,string luUid,DateTime luTime,string rem)
		{
		this.aksId=aksId;
		this.asisId=asisId;
		this.assDgId=assDgId;
		this.dgName=dgName;
		this.dgType=dgType;
		this.adiAttr=adiAttr;
		this.adsItemId=adsItemId;
		this.adsItemName=adsItemName;
		this.cj=cj;
		this.cjStyle=cjStyle;
		this.mcj=mcj;
		this.cjStatus=cjStatus;
		this.crTime=crTime;
		this.crUid=crUid;
		this.luUid=luUid;
		this.luTime=luTime;
		this.rem=rem;
		}
		#endregion
		
		#region 表AssDgScore的字段属性
		/// <summary>
		/// AKS_ID
		/// </summary>
		public string AksId
		{
			get {return aksId;}
			set {aksId=value;}
		}
		/// <summary>
		///主键
		/// </summary>
		public string AsisId
		{
			get {return asisId;}
			set {asisId=value;}
		}
		/// <summary>
		/// ASS_DG_ID
		/// </summary>
		public string AssDgId
		{
			get {return assDgId;}
			set {assDgId=value;}
		}
		/// <summary>
		/// DG_NAME
		/// </summary>
		public string DgName
		{
			get {return dgName;}
			set {dgName=value;}
		}
		/// <summary>
		/// DG_TYPE
		/// </summary>
		public string DgType
		{
			get {return dgType;}
			set {dgType=value;}
		}
		/// <summary>
		///0表示此课目（内容）可选，1表示必选。
		/// </summary>
		public int AdiAttr
		{
			get {return adiAttr;}
			set {adiAttr=value;}
		}
		/// <summary>
		///可能是人的ID，也可能是单位的ID。
		/// </summary>
		public string AdsItemId
		{
			get {return adsItemId;}
			set {adsItemId=value;}
		}
		/// <summary>
		/// ADS_ITEM_NAME
		/// </summary>
		public string AdsItemName
		{
			get {return adsItemName;}
			set {adsItemName=value;}
		}
		/// <summary>
		///0 表示没考试. 成绩是4级制或百分制，沿用MTMS的分数制度。所有的级制，都转换成了百分制。
		/// </summary>
		public int Cj
		{
			get {return cj;}
			set {cj=value;}
		}
		/// <summary>
		/// CJ_STYLE
		/// </summary>
		public int CjStyle
		{
			get {return cjStyle;}
			set {cjStyle=value;}
		}
		/// <summary>
		/// MCJ
		/// </summary>
		public int Mcj
		{
			get {return mcj;}
			set {mcj=value;}
		}
		/// <summary>
		///0表示初始状态。每非法修改1次，应该加1.
		/// </summary>
		public int CjStatus
		{
			get {return cjStatus;}
			set {cjStatus=value;}
		}
		/// <summary>
		/// CR_TIME
		/// </summary>
		public DateTime CrTime
		{
			get {return crTime;}
			set {crTime=value;}
		}
		/// <summary>
		/// CR_UID
		/// </summary>
		public string CrUid
		{
			get {return crUid;}
			set {crUid=value;}
		}
		/// <summary>
		/// LU_UID
		/// </summary>
		public string LuUid
		{
			get {return luUid;}
			set {luUid=value;}
		}
		/// <summary>
		/// LU_TIME
		/// </summary>
		public DateTime LuTime
		{
			get {return luTime;}
			set {luTime=value;}
		}
		/// <summary>
		/// REM
		/// </summary>
		public string Rem
		{
			get {return rem;}
			set {rem=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoAssDgScore CopyTo(MoAssDgScore item)
        {
		    item.aksId=this.aksId;
		    item.asisId=this.asisId;
		    item.assDgId=this.assDgId;
		    item.dgName=this.dgName;
		    item.dgType=this.dgType;
		    item.adiAttr=this.adiAttr;
		    item.adsItemId=this.adsItemId;
		    item.adsItemName=this.adsItemName;
		    item.cj=this.cj;
		    item.cjStyle=this.cjStyle;
		    item.mcj=this.mcj;
		    item.cjStatus=this.cjStatus;
		    item.crTime=this.crTime;
		    item.crUid=this.crUid;
		    item.luUid=this.luUid;
		    item.luTime=this.luTime;
		    item.rem=this.rem;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoAssDgScore mo=new MoAssDgScore();
		    mo.AksId=this.AksId;
		    mo.AsisId=this.AsisId;
		    mo.AssDgId=this.AssDgId;
		    mo.DgName=this.DgName;
		    mo.DgType=this.DgType;
		    mo.AdiAttr=this.AdiAttr;
		    mo.AdsItemId=this.AdsItemId;
		    mo.AdsItemName=this.AdsItemName;
		    mo.Cj=this.Cj;
		    mo.CjStyle=this.CjStyle;
		    mo.Mcj=this.Mcj;
		    mo.CjStatus=this.CjStatus;
		    mo.CrTime=this.CrTime;
		    mo.CrUid=this.CrUid;
		    mo.LuUid=this.LuUid;
		    mo.LuTime=this.LuTime;
		    mo.Rem=this.Rem;
			return mo;
		}
				///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {		 
            if (object.ReferenceEquals(this,obj))
            {
                return true;
            }
            else
            {
                MoAssDgScore NewAssDgScore = obj as MoAssDgScore;
                if (NewAssDgScore == null)
                {
                    return false;
                }
                else
                {
				if (NewAssDgScore.AksId==this.AksId && NewAssDgScore.AsisId==this.AsisId && NewAssDgScore.AssDgId==this.AssDgId && NewAssDgScore.DgName==this.DgName && NewAssDgScore.DgType==this.DgType && NewAssDgScore.AdiAttr==this.AdiAttr && NewAssDgScore.AdsItemId==this.AdsItemId && NewAssDgScore.AdsItemName==this.AdsItemName && NewAssDgScore.Cj==this.Cj && NewAssDgScore.CjStyle==this.CjStyle && NewAssDgScore.Mcj==this.Mcj && NewAssDgScore.CjStatus==this.CjStatus && NewAssDgScore.CrTime==this.CrTime && NewAssDgScore.CrUid==this.CrUid && NewAssDgScore.LuUid==this.LuUid && NewAssDgScore.LuTime==this.LuTime && NewAssDgScore.Rem==this.Rem)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format(System.Globalization.CultureInfo.InvariantCulture,"AksId={0}/AsisId={1}/AssDgId={2}/DgName={3}/DgType={4}/AdiAttr={5}/AdsItemId={6}/AdsItemName={7}/Cj={8}/CjStyle={9}/Mcj={10}/CjStatus={11}/CrTime={12}/CrUid={13}/LuUid={14}/LuTime={15}/Rem={16}",aksId,asisId,assDgId,dgName,dgType,adiAttr,adsItemId,adsItemName,cj,cjStyle,mcj,cjStatus,crTime,crUid,luUid,luTime,rem);
		 
		}
		#endregion
		
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["AKS_ID"]!=null && row["AKS_ID"]!=DBNull.Value)
			{
			    this.AksId = (string)row["AKS_ID"];
			}
			else
			{
				this.AksId =string.Empty;
			}
		    if(row["Asis_ID"]!=null && row["Asis_ID"]!=DBNull.Value)
			{
			    this.AsisId = (string)row["Asis_ID"];
			}
			else
			{
				this.AsisId =string.Empty;
			}
		    if(row["ASS_DG_ID"]!=null && row["ASS_DG_ID"]!=DBNull.Value)
			{
			    this.AssDgId = (string)row["ASS_DG_ID"];
			}
			else
			{
				this.AssDgId =string.Empty;
			}
		    if(row["DG_NAME"]!=null && row["DG_NAME"]!=DBNull.Value)
			{
			    this.DgName = (string)row["DG_NAME"];
			}
			else
			{
				this.DgName =string.Empty;
			}
		    if(row["DG_TYPE"]!=null && row["DG_TYPE"]!=DBNull.Value)
			{
			    this.DgType = (string)row["DG_TYPE"];
			}
			else
			{
				this.DgType =string.Empty;
			}
		    if(row["ADI_Attr"]!=null && row["ADI_Attr"]!=DBNull.Value)
			{
			    this.AdiAttr = (int)row["ADI_Attr"];
			}
			else
			{
				this.AdiAttr =0;
			}
		    if(row["ADS_Item_ID"]!=null && row["ADS_Item_ID"]!=DBNull.Value)
			{
			    this.AdsItemId = (string)row["ADS_Item_ID"];
			}
			else
			{
				this.AdsItemId =string.Empty;
			}
		    if(row["ADS_Item_Name"]!=null && row["ADS_Item_Name"]!=DBNull.Value)
			{
			    this.AdsItemName = (string)row["ADS_Item_Name"];
			}
			else
			{
				this.AdsItemName =string.Empty;
			}
		    if(row["CJ"]!=null && row["CJ"]!=DBNull.Value)
			{
			    this.Cj = (int)row["CJ"];
			}
			else
			{
				this.Cj =0;
			}
		    if(row["CJ_Style"]!=null && row["CJ_Style"]!=DBNull.Value)
			{
			    this.CjStyle = (int)row["CJ_Style"];
			}
			else
			{
				this.CjStyle =0;
			}
		    if(row["MCJ"]!=null && row["MCJ"]!=DBNull.Value)
			{
			    this.Mcj = (int)row["MCJ"];
			}
			else
			{
				this.Mcj =0;
			}
		    if(row["CJ_Status"]!=null && row["CJ_Status"]!=DBNull.Value)
			{
			    this.CjStatus = (int)row["CJ_Status"];
			}
			else
			{
				this.CjStatus =0;
			}
		    if(row["CR_Time"]!=null && row["CR_Time"]!=DBNull.Value)
			{
			    this.CrTime = (DateTime)row["CR_Time"];
			}
			else
			{
				this.CrTime =DateTime.MinValue;
			}
		    if(row["CR_UID"]!=null && row["CR_UID"]!=DBNull.Value)
			{
			    this.CrUid = (string)row["CR_UID"];
			}
			else
			{
				this.CrUid =string.Empty;
			}
		    if(row["LU_UID"]!=null && row["LU_UID"]!=DBNull.Value)
			{
			    this.LuUid = (string)row["LU_UID"];
			}
			else
			{
				this.LuUid =string.Empty;
			}
		    if(row["LU_TIME"]!=null && row["LU_TIME"]!=DBNull.Value)
			{
			    this.LuTime = (DateTime)row["LU_TIME"];
			}
			else
			{
				this.LuTime =DateTime.MinValue;
			}
		    if(row["Rem"]!=null && row["Rem"]!=DBNull.Value)
			{
			    this.Rem = (string)row["Rem"];
			}
			else
			{
				this.Rem =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["AKS_ID"] = this.AksId;
			row["Asis_ID"] = this.AsisId;
			row["ASS_DG_ID"] = this.AssDgId;
			row["DG_NAME"] = this.DgName;
			row["DG_TYPE"] = this.DgType;
			row["ADI_Attr"] = this.AdiAttr;
			row["ADS_Item_ID"] = this.AdsItemId;
			row["ADS_Item_Name"] = this.AdsItemName;
			row["CJ"] = this.Cj;
			row["CJ_Style"] = this.CjStyle;
			row["MCJ"] = this.Mcj;
			row["CJ_Status"] = this.CjStatus;
			row["CR_Time"] = this.CrTime;
			row["CR_UID"] = this.CrUid;
			row["LU_UID"] = this.LuUid;
			row["LU_TIME"] = this.LuTime;
			row["Rem"] = this.Rem;
		}
		#endregion
	}
}
#endregion
